<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <th:block th:include="fragments/header :: header"/>
</head>
<body>
<div>
   <!-- <select class="easyui-combobox" id="season" name="season" style="width: 80px">
    </select>
    <a id="btnShow" href="javascript:void(0)" class="easyui-linkbutton">显示</a>-->
    <table id="dgClubList" style="border: 1px solid black">
        <thead>
            <tr>
                <td width="100px">名称</td>
                <td width="100px">人数</td>
                <td width="100px">平均年龄</td>
                <td width="100px">外援数</td>
                <td width="100px">总身价</td>
                <td width="100px">平均身价</td>
            </tr>
        </thead>
        <tbody>
            <tr th:each="club : ${superModel.clubList}">
                <td><a th:href="@{'/clubDetail/'+${club.id}}" th:text="${club.name}"></a></td>
                <td th:text="${club.squad}"></td>
                <td th:text="${club.age}"></td>
                <td th:text="${club.foreigners}"></td>
                <td th:text="${club.totalValue}"></td>
                <td th:text="${club.value}"></td>
            </tr>
        </tbody>
    </table>
</div>
<script type="text/javascript" th:inline="none">

    $(function () {
        // initDataGrid();
        // initToolbar();
    });

    //初始化表格
    // function initDataGrid() {
    //     $("#dgClubList").datagrid({
    //         url: '/markt/club/list',
    //         idField: 'id',
    //         columns: [[
    //             {field: 'name', title: '名称', width: 80,formatter:function (value,row,index) {
    //                     return "<a href='/markt/club/detail/"+row.id+"'>"+row.name+"</a>"
    //                 }},
    //             {field: 'squad', title: '人数', width: 80},
    //             {field: 'age', title: '平均年龄', width: 80},
    //             {field: 'foreigners', title: '外援数', width: 80},
    //             {field: 'totalValue', title: '总身价', width: 80},
    //             {field: 'value', title: '平均身价', width: 80}
    //         ]]
    //     })
    // }

    //初始化工具条
/*    function initToolbar() {
        $("#season").combobox({
            url: "/markt/enumManage/getEnumTree/?enumName=赛季",
            valueField:'id',
            textField:'text',
            onLoadSuccess : function(){
                //默认选中第一个
                var array=$(this).combobox("getData");
                for(var item in array[0]){
                    if(item=="id"){
                        $(this).combobox('select',array[0][item]);
                    }
                }
            }
        });

        $("#btnShow").click(function () {
            var s = $("#season").combobox('getValue');
            $("#dgClubList").datagrid("load", {
                season: s
            });
        });*/
    // }
</script>
<script src="../../js/custom/super/overview.js" th:src="@{/js/custom/super/overview.js}"></script>
</body>
</html>
